import React, { useState, createContext } from 'react'
import Parent from './Parent'
export const Context = createContext({
  count: 19,
  changeCount: () => {},
})

export default function App() {
  const [count, setCount] = useState(18)
  const changeCount = () => {
    setCount(count + 1)
  }
  return (
    <Context.Provider
      value={{
        count,
        changeCount,
      }}
    >
      <div>
        App
        <hr />
        <Parent />
      </div>
    </Context.Provider>
  )
}
